<template>
  <div class="home h100">
      <!-- <button @click="message">点我出现</button> -->
      <h1 @click="num += 1">
        我是父组件
      </h1>
      <Son :num="num"/>
  </div>
</template>

<script>
import Son from '../components/Son.vue'
export default {
  name: 'Home',
  components: {
    Son
  },
  data() {
    return {
      num: 999
    }
  },
  methods: {
    message() {
      this.$message({
        message: "自定义文字",
        type: "error",
        // duration: 1000
      })
    }
  },
  created() {
    // jsonp   
    // cors

    // 开发环境
    // 线上环境

    this.$axios.post("/api/user/login", {
      user_name: "w916peach",
      user_pwd: "Peach0126!"
    }).then(res => {
      console.log(res)
    })
  }
}
</script>
